<extend name="../application/admin/view/common/base.html" />
<block name="body">
    <div class="layui-row">
        <form class="layui-form layui-col-md12 x-so">
            <div class="layui-input-inline">
                <select class="layui-input" name="productId">
                    <option value="">产品名称</option>
                    <foreach name="productMapping" item="vo" key="k">
                        <option value="{$k}" <if condition="$productId eq $k">selected</if>>{$vo}</option>
                    </foreach>
                </select>
            </div>
            <div class="layui-input-inline">
                <select class="layui-input" name="channelId">
                    <option value="-1">渠道名称</option>
                    <option value="0" <if condition="$channelId eq 0">selected</if>>自然流量</option>
                    <foreach name="channelMapping" item="vo" key="k">
                        <option value="{$k}" <if condition="$channelId eq $k">selected</if>>{$vo}</option>
                    </foreach>
                </select>
            </div>
            <input class="layui-input" placeholder="开始时间" name="beginTime" id="start" value="{$beginTime|default=''}" readonly>
            <input class="layui-input" placeholder="截止时间" name="endTime" id="end" value="{$endTime|default=''}" readonly>
            <button class="layui-btn"  lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
            <button class="layui-btn layui-btn-primary" type="button" onclick="window.location.href='?'"><i class="iconfont">&#xe631;</i></button>
        </form>
    </div>
    <xblock>
        <span class="x-right" style="line-height:40px">共有数据：{$count} 条</span>
    </xblock>
    <table class="layui-table">
        <thead>
        <tr>
            <th>
                <div class="layui-unselect header layui-form-checkbox" lay-skin="primary"><i class="layui-icon">&#xe605;</i></div>
            </th>
            <th>ID</th>
            <th>产品名称</th>
            <th>用户手机号</th>
            <th>点击时间</th>
            <th>渠道名称</th>
        </thead>
        <tbody>
        <foreach name="list" item="vo">
            <tr>
                <td>
                    <div class="layui-unselect layui-form-checkbox" lay-skin="primary" data-id='{$vo.id}'><i class="layui-icon">&#xe605;</i></div>
                </td>
                <td>{$vo.id}</td>
                <td>{$vo.productName}</td>
                <td>{$vo.mobile}</td>
                <td>{$vo.time}</td>
                <td>{$vo.channelName}</td>
            </tr>
        </foreach>
        </tbody>
    </table>
    <div class="page">
        {$page|raw}
    </div>
</block>

<block name="bottom">
    <script type="text/javascript" src="/static/lib/ToolTip/ToolTip.js"></script>
    <script type="text/javascript">
        layui.use('laydate', function(){
            var laydate = layui.laydate;

            //执行一个laydate实例
            laydate.render({
                elem: '#start' //指定元素
            });

            //执行一个laydate实例
            laydate.render({
                elem: '#end' //指定元素
            });
        });
    </script>
</block>